﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ITransactionManager.cs" company="Concept Architecture">
//   (c) 2010 Muhammad Umer Farooq
// </copyright>
// <summary>
//   Defines the ITagRepository type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Hisaab.Business.Interfaces
{
    using System.Collections.Generic;
    using Entities;

    /// <summary>
    /// Defines the <seealso cref="Hisaab.Business.Interfaces.ITransactionManager"/> interface.
    /// </summary>
    public interface ITransactionManager : IManagerBase<Transaction>
    {
        /// <summary>
        /// Gets the by id.
        /// </summary>
        /// <param name="id">The transaction id.</param>
        /// <returns>Transaction matching id</returns>
        Transaction GetById(int id);

        /// <summary>
        /// Gets transaction details by id.
        /// </summary>
        /// <param name="id">The transaction id.</param>
        /// <returns>Transaction matching id</returns>
        Transaction GetTransactionDetails(int id);

        /// <summary>
        /// Filtereds the list.
        /// </summary>
        /// <param name="filter">The filter.</param>
        /// <param name="filterAccountId">The filter account id.</param>
        /// <returns>List of transactions in filter</returns>
        IEnumerable<Transaction> FilteredList(TransactionFilter filter, int? filterAccountId);

        /// <summary>
        /// Relates the transactions.
        /// </summary>
        /// <param name="sourceTransactionId">The source transaction id.</param>
        /// <param name="destinationTransactionId">The destination transaction id.</param>
        void RelateTransactions(int sourceTransactionId, int destinationTransactionId);

        /// <summary>
        /// Filtereds the list by tag.
        /// </summary>
        /// <param name="filter">The transaction filter.</param>
        /// <param name="tagId">The tag id.</param>
        /// <returns>List of transactions in filter</returns>
        IEnumerable<Transaction> FilteredListByTag(TransactionFilter filter, int? tagId);
    }
}